@extends('../manage.layout')
@section('content')
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            系统管理
            <small>添加权限</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
            <li class="active">Here</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <!-- general form elements -->
                <div class="box-body table-responsive no-padding">
                    <div class="box box-primary">
                        {{--<div class="box-header with-border">--}}
                            {{--<h3 class="box-title">{{ $users[0]['email'] }}</h3>--}}
                        {{--</div>--}}
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form method="post" action="{{ url('manage/rule/store')}}" enctype=”multipart/form-data”>
                            {{--{{ method_field('PUT') }}--}}
                            {{--{{ csrf_field() }}--}}
                            <input type="hidden" name="_token" value="{{ csrf_token() }}">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="">选择角色</label>
                                    <select class="form-control" name="role_id">
                                        <option value="">请选择</option>
                                        @foreach($role as $v)
                                            <option value="{{$v->id}}">{{$v->name}}</option>
                                        @endforeach
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="">选择数据表</label>
                                    <select class="form-control" name="table_id">
                                        <option value="">请选择</option>
                                        @foreach($table as $v)
                                            <option value="{{$v->id}}">{{$v->name_zh}}</option>
                                        @endforeach
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="">查看权限</label>
                                    <select class="form-control" name="view">
                                        <option value="0">否</option>
                                        <option value="1">是</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="">创建权限</label>
                                    <select class="form-control" name="add">
                                        <option value="0">否</option>
                                        <option value="1">是</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="">修改权限</label>
                                    <select class="form-control" name="update">
                                        <option value="0">否</option>
                                        <option value="1">是</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="">删除权限</label>
                                    <select class="form-control" name="delete">
                                        <option value="0">否</option>
                                        <option value="1">是</option>
                                    </select>
                                </div>
                            </div>
                            <!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">确定</button>&nbsp;&nbsp;<span class="btn btn-primary" onclick="window.location.href='/manage/user'">返回</span>
                            </div>
                         </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
@endsection
@section('script')
@endsection
<script src="/plugin/jquery/jquery-2.2.1.min.js"></script>
<script src="/plugin/layer-2.4/layer.js"></script>
